package com.example.thegreatwall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "inventory")
public class Inventory {
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 产品类型：0-单个景点，1-套餐
     */
    @TableField(value = "product_type")
    private Byte productType;

    /**
     * 日期
     */
    @TableField(value = "record_date")
    private String recordDate;

    /**
     * 基础票数
     */
    @TableField(value = "base_tickets")
    private Integer baseTickets;

    /**
     * 票数倍数(平日1.0,周末1.5,节假日2.0等)
     */
    @TableField(value = "multiplier")
    private BigDecimal multiplier;

    /**
     * 计算后的最大票数
     */
    @TableField(value = "max_tickets")
    private Integer maxTickets;

    /**
     * 可用票数
     */
    @TableField(value = "available_tickets")
    private Integer availableTickets;

    @TableField(value = "last_updated")
    private Date lastUpdated;

    @TableField(value = "locked_tickets")
   private Integer lockedTickets;
@TableField(value = "version")
  private Integer version;
}